<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
    <meta charset="UTF-8">
    <title>欢迎 - 企业培训平台</title>
    <link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<div th:replace="~{fragments/header :: common-header}"></div>

<div class="main-content">
    <div class="container">
        <section class="welcome-section">
            <h1>欢迎来到企业培训平台</h1>
            <p>在这里，您可以高效学习、提升专业技能，与团队共同成长，共创企业辉煌未来。</p>

            <div th:if="${session.loggedInUser == null}" class="mt-2">
                <a th:href="@{/login}" class="btn btn-primary">登录系统</a>
            </div>

            <div th:if="${session.loggedInUser != null}" class="mt-2">
                <p style="font-size: 1.1em; margin-bottom: 20px;">
                    您好, <strong th:text="${session.loggedInUser.username}">用户</strong>!
                    (<span th:text="${session.loggedInUser.role == 'TEACHER' ? '教师' : '学生'}">角色</span>)
                </p>
            </div>
        </section>
    </div> </div> </body>
</html>
